﻿<CodeSnippetTabbed DocLink="https://docs.devexpress.com/Blazor/DevExpress.Blazor.DxChartSeriesPoint">
    <CodeSnippetTabPage Text="Razor">@(@"<DxChart Data=""@WeatherForecasts""
         CustomizeSeriesPoint=""@PreparePointColor""
         CssClass=""mw-1100"">
    <DxChartLineSeries AggregationMethod=""@(i => (int)i.Average())""
                       Color=""@System.Drawing.Color.Gray""
                       ValueField=""@((WeatherForecast i) => i.TemperatureF)""
                       ArgumentField=""@(i => i.Date.Date)""
                       Name=""Temperature, F"">
        <DxChartSeriesPoint Symbol=""ChartPointSymbol.Polygon"" Color=""@System.Drawing.Color.Gray"" Size=""25"" />
    </DxChartLineSeries>
    <DxChartLegend Position=""RelativePosition.Outside"" />
</DxChart>

@code {
    WeatherForecast[] WeatherForecasts;

    protected void PreparePointColor(ChartSeriesPointCustomizationSettings pointSettings)
    {
        double value = (double)pointSettings.Point.Value;
        if(value > 75)
            pointSettings.PointAppearance.Color = System.Drawing.Color.Red;
        else if(value < 25)
            pointSettings.PointAppearance.Color = System.Drawing.Color.Blue;
    }
}")</CodeSnippetTabPage>
</CodeSnippetTabbed>
